package com.ti.leevy.common;

import com.ti.leevy.R;

import android.content.Context;
import android.content.res.Resources;

/**
 * 初始化配置
 * 
 * @author zGuan
 *
 */
public class Config {
	
    public static String PATH_CACHE;
    public static String PATH_CACHE_IMAGES;

    public static void init(Context context){
    	
    	initCache(context);
    	
    }
    
    // 初始化缓存路径
    private static void initCache(Context context) {
    	Resources res = context.getResources();
        try {
            PATH_CACHE = context.getExternalCacheDir().getPath();
        } catch (Exception e) {
            PATH_CACHE = context.getCacheDir().getPath();
        }

        PATH_CACHE_IMAGES = PATH_CACHE + res.getString(R.string.app_config_path_cache_images);
    }
    
}
